package org.mfoyou.agent.center.dao.inf;

import org.apache.ibatis.annotations.Param;
import org.mfoyou.agent.common.dao.domain.HuawuServiceCouponRule;

/**
 * 优惠券分享规则实体类
 *
 * @author wb-zh270168
 */
public interface HuawuServiceCouponRuleMapper {

    /**
     * 新增优惠券规则
     *
     * @param rule
     * @return
     */
    int insert(HuawuServiceCouponRule rule);

    /**
     * 查询唯一的分享优惠券规则
     *
     * @return
     */
    HuawuServiceCouponRule selectRule();

    /**
     * 根据id删除优惠券
     *
     * @param id
     * @return
     */
    int deleteById(@Param("id") Integer id);

    /**
     * 通过ruleId更新优惠券分享规则
     *
     * @param rule
     * @return
     */
    int updateRuleById(HuawuServiceCouponRule rule);
}